<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/custom-html.tld" prefix="chtml" %>

<%@ page import="java.util.*"%>
<%@ page import="java.text.SimpleDateFormat"%>
<%@ page import="com.erp.framework.util.CommonUtil"%>
<%@ page import="com.erp.app.common.ProjectConstants"%>
<%@ page import="com.erp.app.util.web.WebUtil"%>
<%@ page import="com.erp.app.catalog.login.web.CatalogLoginAction"%>

<%@ page import="java.util.ArrayList"%>
<%@ page import="java.util.Hashtable"%>
<%@ page import="java.util.HashMap"%>
<%@ page import="java.util.Iterator"%>

<jsp:useBean id="catalogLoginForm" scope="session" type="com.erp.app.catalog.login.web.CatalogLoginForm" />

<html>
<head>
<title>:::[MS Library system]:::</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<link rel="stylesheet" href="stylesheet/style1.css" type="text/css">
<link href="<%= request.getContextPath()%>/css/catalogCss/global.css" rel="stylesheet" type="text/css" />
<link href="<%= request.getContextPath()%>/css/catalogCss/buttons.css" rel="stylesheet" type="text/css" />
<link href="<%= request.getContextPath()%>/css/catalogCss/forms.css" rel="stylesheet" type="text/css" />
<link href="<%= request.getContextPath()%>/css/catalogCss/tables.css" rel="stylesheet" type="text/css" />

<SCRIPT LANGUAGE="javascript" SRC="js/sys.js"></SCRIPT>
<script language="javascript">

if (parent != self ) {
 parent.location = self.location;
}
 parent.scroll(1,500);
function doLoad(){
	<%
		String lastPageEvent = CommonUtil.nullToString(catalogLoginForm.getPageEvent());
		String lastPageEventSrc = CommonUtil.nullToString(catalogLoginForm.getPageEventSrc());		
		
		if (CatalogLoginAction.ACTION_SHOW_PIC.equals(lastPageEvent)){			
			out.print(WebUtil.openFlashDo()) ;
		}
		if(CatalogLoginAction.ACTION_SEND_EMAIL.equals(lastPageEvent)
//			&& ProjectConstants.GENERIC_YES.equals((String)session.getAttribute(ProjectConstants.SESSION_SEND_EMAIL_WITH_POPUP))
			){
			  session.removeAttribute(ProjectConstants.SESSION_SEND_EMAIL_WITH_POPUP);
				out.print(WebUtil.openSendEmailDo()) ;			
		}
		
	%>
}
</script>
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="javascript:doLoad();">

<html:form action = "/catalogLogin">
	

	<html:hidden property="pageEvent"/>
	<html:hidden property="action"/>
	<html:hidden property="pageEventSrc" />
	<!--html:hidden property="eventSrc" /-->
	<html:hidden property="pageMode" />
	<html:hidden property="mainShowType"/>

	<table width="100%" height="100%" border="0" cellspacing="0">
		<tr width="100%" height="70">
			<td colspan="2" height="70">
					<jsp:include page="/jsp/templates/catalogHeader.jsp"/>		  </td>
		</tr>
		<tr width="100%">			
			<td width="20%">
					<jsp:include page="/jsp/templates/catalogSidebar.jsp"/>		  </td>
			<td style="padding-right:5px" width="80%">				
				<% if (CatalogLoginAction.SHOW_MAIN_ADVANCE_SEARCH.equals(catalogLoginForm.getMainShowType())){%>
					<jsp:include page="/jsp/com/erp/app/catalog/itemSearch/itemAdvanceSearch.jsp"/>
				<%}else if (CatalogLoginAction.SHOW_MAIN_SEARCH_EXTRA.equals(catalogLoginForm.getMainShowType())){%>
					<jsp:include page="/jsp/com/erp/app/catalog/itemSearch/itemSearchResult.jsp"/>
				<%}else if (CatalogLoginAction.SHOW_ITEM_PIC_DETAIL.equals(catalogLoginForm.getMainShowType())){%>
					<jsp:include page="/jsp/com/erp/app/catalog/itemSearch/itemMaintDetail.jsp"/>
				<%}else{%>
					<jsp:include page="/jsp/com/erp/app/catalog/login/catalogPage.jsp"/>
				<%}	%>		  </td>	
			<td></td>
	    </tr>
	</table>
</html:form>
</body>

</html>
